/******************************************************************************
 * RLT DSP
 * by Roberto Bender <beto.bender@gmail.com>
 * under GPL 2.0 license
 * 2009
******************************************************************************/

#include "gain.h"
#include "defines.h"

workingWord gain(workingWord input, struct FilterParams* params)
{
    if(params->m_Amp < 0.0) return input;

    workingWord output = input * params->m_Amp;
    if(output < WORD_MIN) output = WORD_MIN;
    if(output > WORD_MAX) output = WORD_MAX;
    
    return output;
}
